{% extends "admin_base.html" %}
{% block title %}
医生管理
{% endblock %}

{% block subtitle %}
用户权限管理/医生管理
{% endblock %}


{% block main %}医生管理{% endblock %}

{% block content %}

<section class="section">
  <div class="row">

    <div class="col-xl-12">

      <div class="card">
        <div class="card-body">
          <!-- <h5 class="card-title">医生管理</h5> -->
          <h5 class="card-title">
            <!-- <a class="btn btn-danger" href="#!"><i class="mdi mdi-window-close"></i> 批量驳回</a> -->
            <!-- <a class="btn btn-primary" href="#!"><i class="mdi mdi-window-close"></i> 批量通过</a> -->
          </h5>

          <div class="table-responsive">
            <table class="table table-bordered">
              <thead>
                <tr>
                  <!-- <th>
                    <label class="lyear-checkbox checkbox-primary">
                      <input type="checkbox" id="check-all"><span></span>
                    </label>
                  </th> -->
                  <th>用户编号</th>
                  <!-- <th>角色</th> -->
                  <th>姓名</th>
                  <th>性别</th>
                  <th>年龄</th>
                  <th>邮箱</th>
                  <th>所属科室</th>
                  <th>所属医院</th>
                  <th>擅长领域</th>
                  <th>职称</th>
                  <th>注册日期</th>
                  <th>状态</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody>
                {% for doctor in doctors %}
                <tr>

                  <!-- <td>
                    <label class="lyear-checkbox checkbox-primary">
                      <input type="checkbox" name="ids[]" value="1"><span></span>
                    </label>
                  </td> -->
                  <td>{{doctor.uid}}</td>
                  <td>{{doctor.doctor_name}}</td>
                  <td>{{doctor.doctor_sex}}</td>
                  <td>{{doctor.doctor_age}}</td>
                  <td>{{doctor.email}}</td>
                  <td>{{doctor.deid.d_name}}</td>
                  <td>{{doctor.hospital}}</td>
                  <td>{{doctor.good_at}}</td>
                  <td>{{doctor.title}}</td>
                  <td>{{doctor.c_time}}</td>
                  {% if doctor.states == 1 %}
                  <td>已通过,正常使用</td>
                  <td>
                    <div class="btn-group">
                      无需操作
                    </div>
                  </td>
                  {% elif doctor.states == 2 %}
                  <td>已驳回</td>
                  <td>
                    <div class="btn-group">
                      无需操作
                    </div>
                  </td>
                  {% else %}
                  <td>待审核</td>
                  <td>
                    <div class="btn-group">
                      <a type="button" class="btn btn-outline-danger btn-sm" href="{% url 'adminApp:doctor_manage' %}?uid={{doctor.uid}}&type=2">驳回</a>
                      <span>|</span>
                      <a type="button" class="btn btn-outline-info btn-sm" href="{% url 'adminApp:doctor_manage' %}?uid={{doctor.uid}}&type=1">通过</a>
                    </div>
                  </td>

                  {% endif %}
                </tr>
                {% endfor %}
              </tbody>
            </table>

          </div>


        </div>

      </div>
    </div>
  </div>



</section>

{% endblock %}